<html>
<head><meta charset="utf-8"><title>SIGILL with `less` · miri · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/269128-miri/index.html">miri</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/269128-miri/topic/SIGILL.20with.20.60less.60.html">SIGILL with `less`</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="221256791"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/269128-miri/topic/SIGILL%20with%20%60less%60/near/221256791" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Noah Lev <a href="https://rust-lang.github.io/zulip_archive/stream/269128-miri/topic/SIGILL.20with.20.60less.60.html#221256791">(Dec 30 2020 at 23:52)</a>:</h4>
<p>For some reason, I'm getting a SIGILL with Miri and <code>less</code>. I can scroll through the logs fine, but when I close them I see there was a SIGILL:</p>
<div class="codehilite" data-code-language="Bash Session"><pre><span></span><code><span class="gp">$</span> <span class="nv">MIRI_LOG</span><span class="o">=</span>debug <span class="nv">RUSTC_LOG_COLOR</span><span class="o">=</span>always ./miri run tests/run-pass/align.rs <span class="p">&amp;|</span> less -R
<span class="go">fish: Process 13677, './miri' 'MIRI_LOG=debug RUSTC_LOG_COLOR=…' terminated by signal SIGILL (Illegal instruction)</span>
</code></pre></div>
<p>This only happens with <code>&amp;|</code> (which pipes stdout <em>and</em> stderr -- equivalent to <code>2&gt;&amp;1 |</code> in bash), not with <code>|</code> (which only pipes stdout). Is anyone else having this issue?</p>
<p>I don't see this error in bash, but it could be that it's not reporting it.</p>



<a name="221258884"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/269128-miri/topic/SIGILL%20with%20%60less%60/near/221258884" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Iñaki Garay <a href="https://rust-lang.github.io/zulip_archive/stream/269128-miri/topic/SIGILL.20with.20.60less.60.html#221258884">(Dec 31 2020 at 00:32)</a>:</h4>
<p>Have you tried with another shell? It's very unlikely but perhaps fish is not handling the pipes correctly?</p>



<a name="221259298"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/269128-miri/topic/SIGILL%20with%20%60less%60/near/221259298" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Noah Lev <a href="https://rust-lang.github.io/zulip_archive/stream/269128-miri/topic/SIGILL.20with.20.60less.60.html#221259298">(Dec 31 2020 at 00:42)</a>:</h4>
<blockquote>
<p>I don't see this error in bash, but it could be that it's not reporting it.</p>
</blockquote>
<p>^</p>



<a name="221259305"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/269128-miri/topic/SIGILL%20with%20%60less%60/near/221259305" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Noah Lev <a href="https://rust-lang.github.io/zulip_archive/stream/269128-miri/topic/SIGILL.20with.20.60less.60.html#221259305">(Dec 31 2020 at 00:42)</a>:</h4>
<p>It would be weird if fish were not handling the pipes correctly.</p>



<a name="221259309"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/269128-miri/topic/SIGILL%20with%20%60less%60/near/221259309" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Noah Lev <a href="https://rust-lang.github.io/zulip_archive/stream/269128-miri/topic/SIGILL.20with.20.60less.60.html#221259309">(Dec 31 2020 at 00:42)</a>:</h4>
<p>I don't have this issue when viewing rustc logs btw.</p>



<a name="221273501"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/269128-miri/topic/SIGILL%20with%20%60less%60/near/221273501" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/269128-miri/topic/SIGILL.20with.20.60less.60.html#221273501">(Dec 31 2020 at 06:45)</a>:</h4>
<p>When you close it, the stdout and stderr pipes are closed when you use |&amp;. Only stdout is closed if you use |. When a program attempts to write to stdout after it was closed, it will panick. This will attempt to write the panic message to stderr and upon failing to panics again, which aborts the process.</p>



<a name="221315536"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/269128-miri/topic/SIGILL%20with%20%60less%60/near/221315536" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Noah Lev <a href="https://rust-lang.github.io/zulip_archive/stream/269128-miri/topic/SIGILL.20with.20.60less.60.html#221315536">(Dec 31 2020 at 20:52)</a>:</h4>
<p>But why is it trying to write to stdout when I close it? Also, I don't see any panic message with <code>|</code> so it doesn't seem to be panicking.</p>



<a name="221316140"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/269128-miri/topic/SIGILL%20with%20%60less%60/near/221316140" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/269128-miri/topic/SIGILL.20with.20.60less.60.html#221316140">(Dec 31 2020 at 21:04)</a>:</h4>
<p>The log messages are written to stderr, not stdout: <a href="https://github.com/rust-lang/rust/blob/44e3daf5eee8263dfc3a2509e78ddd1f6f783a0e/compiler/rustc_driver/src/lib.rs#L1310">https://github.com/rust-lang/rust/blob/44e3daf5eee8263dfc3a2509e78ddd1f6f783a0e/compiler/rustc_driver/src/lib.rs#L1310</a></p>



<a name="221316289"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/269128-miri/topic/SIGILL%20with%20%60less%60/near/221316289" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/269128-miri/topic/SIGILL.20with.20.60less.60.html#221316289">(Dec 31 2020 at 21:07)</a>:</h4>
<p><code>tracing_tree</code> panics on every error while writing: <a href="https://github.com/davidbarsky/tracing-tree/blob/876f942bda5c31987a73e4177a401c1197b2698c/src/format.rs#L159">https://github.com/davidbarsky/tracing-tree/blob/876f942bda5c31987a73e4177a401c1197b2698c/src/format.rs#L159</a></p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>